Typically, as far as methods for detecting motion vectors are concerned, a method based on block matching and a method based on the gradient technique are known. In the method based on block matching, for example, for each block in a reference image, an area having the highest degree of correlation of pixels is detected in a target image; and the motion vectors are detected on a block-by-block basis. Thus, in the method based on block matching, although it is possible to detect relatively large motions in a stable manner, it is not possible to detect motion vectors on a pixel-by-pixel basis.
In the method based on the gradient technique, such motion vectors are calculated which enable achieving minimization of a gradient-technique objective function. Thus, in the method based on the gradient technique, although motion vectors can be detected on a pixel-by-pixel basis, it is not possible to detect large motions.
As a method of making up for the disadvantage of the method based on the gradient technique, a method is known in which motion vectors based on the gradient technique are calculated using an objective function that has the initial value set to the motion vectors calculated according to the method based on block matching. However, in the method based on the gradient technique, it is not possible to detect motions equal to or larger than a certain level. Hence, in this particular method, only minor corrections are possible with respect to the motion vectors detected according to the method based on block matching. For that reason, if the motions in a single block undergo variation equal to or greater than a certain level, then this particular method leads to cancellation of the variation of the motions in that block. As a result, the motion vectors cannot be detected with accuracy.
Meanwhile, regarding a hierarchical search in which motion vectors are detected in a stepwise manner from images having lower resolutions to images having higher resolutions, a method is known in which the gradient-technique-based motion vectors are calculated using an objective function that has the initial value set to the motion vectors calculated according to the method based on block matching. In this method, the processing result at one of the levels of low resolution is used as the initial value for searching the motion vectors according to the method based on block matching. However, in this method, if there is false detection at one of the levels of low resolution, then it becomes difficult to correct that error in the next level.